home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / UCRASM25.ARJ / RANGESET.ASM < prev    next >
Assembly Source File  |  1991-10-12  |  763b  |  51 lines

  1. StdGrp        group    stdlib,stddata
  2. stddata        segment    para public 'sldata'
  3. stddata        ends
  4. ;
  5. stdlib        segment    para public 'slcode'
  6.         assume    cs:stdgrp
  7. ;
  8. ;
  9. ; RangeSet-    Unions into a set the characters in a specified range.
  10. ;
  11. ; inputs:
  12. ;
  13. ;    ES:DI-  Points at the set (at its mask byte).
  14. ;    AL-    Lower bound for range.
  15. ;    AH-    Upper bound for range (note: al must be less than ah).
  16. ;
  17. ;
  18. ;
  19.         public    sl_RangeSet
  20. ;
  21. sl_RangeSet    proc    far
  22.         push    ax
  23.         push    bx
  24.         push    cx
  25.         pushf
  26.         push    di
  27. ;
  28.         mov    ch, 0
  29.         mov    cl, ah
  30.         sub    cl, al
  31.         inc    cx
  32.         mov    bh, 0
  33.         mov    bl, al
  34.         mov    al, es:[di]
  35.         lea    di, 8[di][bx]
  36. SetRange:    or    es:[di], al
  37.         inc    di
  38.         loop    SetRange
  39. ;
  40.         pop    di
  41.         popf
  42.         pop    cx
  43.         pop    bx
  44.         pop    ax
  45.         ret
  46. sl_RangeSet    endp
  47. ;
  48. ;
  49. stdlib        ends
  50.         end
  51.